package cn.iocoder.yudao.module.crossborder.enums;

import cn.iocoder.yudao.framework.common.core.ArrayValuable;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

import java.util.Arrays;

/**
 * 跨境电商订单状态枚举
 *
 * @author LHL
 */
@RequiredArgsConstructor
@Getter
public enum CrossBorderOrderStatusEnum implements ArrayValuable<Integer> {

    PENDING(10, "待处理"),
    CONFIRMED(20, "已确认"),
    PAID(30, "已支付"),
    PROCESSING(40, "处理中"),
    SHIPPED(50, "已发货"),
    IN_TRANSIT(60, "运输中"),
    CUSTOMS_CLEARANCE(70, "清关中"),
    DELIVERED(80, "已送达"),
    COMPLETED(90, "已完成"),
    CANCELLED(100, "已取消"),
    REFUNDED(110, "已退款"),
    RETURNED(120, "已退货");

    public static final Integer[] ARRAYS = Arrays.stream(values()).map(CrossBorderOrderStatusEnum::getStatus).toArray(Integer[]::new);

    /**
     * 状态
     */
    private final Integer status;
    /**
     * 名称
     */
    private final String name;

    @Override
    public Integer[] array() {
        return ARRAYS;
    }

}
